package com.singzi.designPattern.agentModel;

import java.lang.reflect.Proxy;

public interface GiveGift {
    void GiveDolls();
    void GiveFlowers();
    void GiveChocolate();
}
class Pursuit implements GiveGift{

    SchoolGirl schoolGirl = new SchoolGirl();
    public Pursuit(SchoolGirl schoolGirl){
        this.schoolGirl = schoolGirl;
    }
    @Override
    public void GiveDolls() {
        System.out.println(schoolGirl.getName() + " 送你洋娃娃");
    }

    @Override
    public void GiveFlowers() {
        System.out.println(schoolGirl.getName() + " 送你鲜花");
    }

    @Override
    public void GiveChocolate() {
        System.out.println(schoolGirl.getName() + " 送你巧克力");
    }

}
class ProxyGive implements GiveGift{

    Pursuit pursuit;
    public ProxyGive(SchoolGirl schoolGirl){
        pursuit = new Pursuit(schoolGirl);
    }

    @Override
    public void GiveDolls() {
        pursuit.GiveDolls();
    }

    @Override
    public void GiveFlowers() {
        pursuit.GiveFlowers();

    }

    @Override
    public void GiveChocolate() {
        pursuit.GiveChocolate();
    }
}